package com.lightheart.sphr.xiaobinggan.bottom.ui


import com.lightheart.sphr.xiaobinggan.R
import com.lightheart.sphr.xiaobinggan.base.BaseActivity
import com.lightheart.sphr.xiaobinggan.module.home.presenter.HomePresenter

class EqualBottomBarActivity : BaseActivity<HomePresenter>() {

    override fun getLayoutId() = R.layout.activity_equal_bottom_bar

    override fun initInjector() {
    }

    override fun initView() {
        var fragment = supportFragmentManager.findFragmentById(R.id.content_frame) as EqualBottomBarFragment?
        if (fragment == null) {
            fragment = EqualBottomBarFragment()
            addFragment(fragment, R.id.content_frame)
        }
    }

    private fun addFragment(fragment: EqualBottomBarFragment, id: Int) {
        val ft = supportFragmentManager.beginTransaction()
        ft.add(id, fragment)
        ft.commit()
    }
}